package judesart.app.client.controller;

import java.util.List;

import judesart.app.domain.User;
import judesart.app.shared.ValidationException;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("user")
public interface UserController extends RemoteService
{
    public static class Util
    {
        private static UserControllerAsync instance;

        public static UserControllerAsync getInstance()
        {
            if (instance == null)
            {
                instance = GWT.create(UserController.class);
            }
            return instance;
        }
    }

    User createUser(User user) throws ValidationException;

    User updateUser(User user) throws ValidationException;

    User getUser(Long id);

    List<User> searchUsers();

    void deleteUser(Long id);

    User getCurrentUser();

    User getFeaturedArtist();
}
